package com.ruoyi.system.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author nanyang
 */
public class TAppInterfaceDto {

    @Data
    @ApiModel("TAppInterfaceDto - Insert")
    public static class Insert {
        @NotNull(message ="应用不能为空")
        @ApiModelProperty("应用ID")
        private Long appId;
        @ApiModelProperty("接口ID数组")
        private List<Long> interfaceIdList;
        @ApiModelProperty("接口访问频率")
        private  String frequency;
    }

    @Data
    @ApiModel("TAppInterfaceDto - updateFrequency，根据应用id、接口id修改访问频率")
    public static class Update {
        @NotNull(message ="应用不能为空")
        @ApiModelProperty("应用ID")
        private Long appId;
        @NotNull(message ="接口不能为空")
        @ApiModelProperty("接口ID")
        private Long interfaceId;
        @ApiModelProperty("接口访问频率")
        private  String frequency;
    }


    @Data
    @ApiModel("TAppInterfaceDto - Delete")
    public static class Delete {
        @ApiModelProperty("应用ID")
        private Long appId;
        @ApiModelProperty("接口ID数组")
        private List<Long> interfaceIdList;
    }



    @Data
    @ApiModel("TAppInterfaceDto - Query")
    public static class Query {
        @NotNull(message = "请选择应用")
        @ApiModelProperty("应用ID")
        private Long appId;
    }
}
